<?php

namespace app\controller;
use app\BaseController;
use think\facade\Db;

class Test extends BaseController
{
    public function index()
    {
        // 获取所有数据
        $data = Db::name('user')->select();
        return json($data);
    }
    public function add()
    {
       return 'ok';
    }
}